#include "Abstraction.h"
#include "AbstractionImp.h"

#include <iostream>
using namespace std;

void test()
{
    AbstractionImp* imp = new ConcreteAbstractionImpA();
    Abstraction* abs = new RefinedAbstraction(imp);
    abs->Operation();

    delete abs;
    delete imp;
    imp = nullptr;
    abs = nullptr;
    
    imp = new ConcreteAbstractionImpB();
    abs = new RefinedAbstraction(imp);
    abs->Operation();
}

int main()
{
    test();
    return 0;
}